<!--折叠-->
<script setup>
import {ref, toRefs} from "vue";
import {useStore} from "vuex";

const props = defineProps({
  title: {type: String},
})
const emit = defineEmits(['update:modelValue'])
const store = useStore();
const {title} = toRefs(props)
const show = ref(false);


</script>

<template>
  <div class="nga-collapse">
    <el-switch v-model="show" :active-text="title ? title : '折叠'" active-color="green" inactive-color="red" size="small"/>
    <div v-if="show">
      <slot></slot>
    </div>
  </div>
</template>

<style scoped>

</style>